package com.yhq.spring.web;

import com.yhq.spring.web.service.CalculateService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

/**
 * @author hqyin
 * @date 2023/1/30 11:53 上午
 */
@SpringBootApplication(scanBasePackages = "com.yhq.spring.web")
public class TestApplication {
    public static void main(String[] args) {
        ApplicationContext applicationContext = SpringApplication.run(TestApplication.class);
        System.out.println("容器启动完成");

        //测试ProxyFactoryBean
        CalculateService demo = (CalculateService) applicationContext.getBean("calProxy",CalculateService.class);
        System.out.println(demo.add());

    }
}
